Ext.define("core.user.view.UserForm",{
	extend:"Ext.form.Panel",
	alias:"widget.userform",
	layout : {
		type : "table",
		columns : 1
	},
	align:"left",
	defaults:{
		margin:"10 0 0 15",
		selectOnFocus:true,
		width:300,
		msgTarget:"side" //提示信息现在的位置
	},
	tbar:[{
		xtype:"button",
		ref:"save",
		iconCls:"table_save",
		text:"保存"
	},{
		xtype:"button",
		ref:"return",
		iconCls:"return",
		text:"返回"
	}],
	items:[
		{
		xtype:"textfield",
		fieldLabel:"用户ID",
		name:"userId",
		id:"userId",
		hidden:true
	},{
		xtype:"textfield",
		fieldLabel:"ID",
		name:"id",
		hidden:true
	},{
		xtype:"textfield",
		fieldLabel:"注册时间",
		name:"regTime",
		hidden:true
	},{
		xtype:"textfield",
		fieldLabel:"用户名",
		name:"username",
		id:"username",
		allowBlank : false,//不允许为空
		blankText : '用户名不能为空',//错误提示内容 
		readOnly:false
	},{
		xtype:"textfield",
		fieldLabel:"密码",
		inputType : 'password',  
		name:"password",
		allowBlank : false,//不允许为空
		blankText : '密码不能为空',//错误提示内容 
		readOnly:false
	},{
		xtype: 'radiogroup',
		fieldLabel: '性别',
		width: 200,
		items: [
			{

				boxLabel: '男',
				name: 'sex',
				checked: true,
				inputValue: '男'
			},
			{
				boxLabel: '女',
				name: 'sex',
				inputValue: '女'
			}
		],
		readOnly:false
	},{
		xtype:"numberfield",
		fieldLabel:"电话",
		name:"phone",
		hideTrigger: true,//隐藏触发器
		keyNavEnabled: false,//禁止键盘微调
		mouseWheelEnabled: false,//禁止鼠标滚轮微调
		allowBlank : false,//不允许为空
		blankText : '电话不能为空',//错误提示内容
		readOnly:false
	},{
		xtype:"numberfield",
		fieldLabel:"QQ",
		name:"qq",
		allowDecimals: false,//只能输入整数
		hideTrigger: true,//隐藏触发器
		keyNavEnabled: false,//禁止键盘微调
		mouseWheelEnabled: false,//禁止鼠标滚轮微调
		readOnly:false
	},{
		xtype:"textfield",
		fieldLabel:"Email",
		name:"email",
		readOnly:false
	},{
		xtype:"textfield",
		width:500,
		fieldLabel:"地址",
		name:"address",
		readOnly:false
	}],
	initComponent:function(){
		this.callParent(arguments);
	}
});